/* app/actions/mylist.js */

import request from '../utils/request';

import { GET_MY_TOPIC_LIST,GET_MY_GROUP_LIST,GET_USER_COLLECT } from '../constants/actionTypes';

export function getMyGroupTuanListByTopicId(params,onSuccess = (()=>{}),onError = (()=>{})) {
	var url = 'http://jsapi.tuan.ymatou.com/api/Tuan/MyGroupTuanList';
	return {
	    type: GET_MY_GROUP_LIST,
	    payload: {
	        promise: request(url,{/*options*/},params),
	        onSuccess,
	        onError
	    }
	}
}

export function getMyTopicList(params,onSuccess = (()=>{}),onError = (()=>{})) {
	var url = 'http://jsapi.tuan.ymatou.com/api/Topic/GetMyTopicList';
	return {
	    type: GET_MY_TOPIC_LIST,
	    payload: {
	        promise: request(url,{/*options*/},params),
	        onSuccess,
	        onError
	    }
	}
}
